package com.yourcompany.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
@ApiModel(value = "User对象", description = "用户表")
public class User extends BaseEntity {

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("密码盐")
    private String salt;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("性别：0-未知 1-男 2-女")
    private Integer gender;

    @ApiModelProperty("微信openid")
    private String openid;

    @ApiModelProperty("微信unionid")
    private String unionid;

    @ApiModelProperty("微信昵称")
    private String wxNickname;

    @ApiModelProperty("微信头像")
    private String wxAvatar;

    @ApiModelProperty("真实姓名")
    private String realName;

    @ApiModelProperty("身份证号")
    private String idCard;

    @ApiModelProperty("是否实名认证：0-未认证 1-已认证")
    private Boolean isVerified;

    @ApiModelProperty("账户余额")
    private BigDecimal balance;

    @ApiModelProperty("冻结余额")
    private BigDecimal frozenBalance;

    @ApiModelProperty("积分")
    private Integer points;

    @ApiModelProperty("用户等级")
    private Integer level;

    @ApiModelProperty("注册来源：app/h5/wx/mini")
    private String registerSource;

    @ApiModelProperty("注册IP")
    private String registerIp;

    @ApiModelProperty("最后登录时间")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("最后登录IP")
    private String lastLoginIp;

    @ApiModelProperty("设备ID")
    private String deviceId;

    @ApiModelProperty("推送token")
    private String pushToken;

    @ApiModelProperty("状态：0-禁用 1-启用")
    private Integer status;

    @ApiModelProperty("删除标志：0-正常 1-删除")
    @TableLogic
    @TableField("is_deleted")
    private Integer deleted;

    @ApiModelProperty("创建人ID")
    private Long creatorId;

    @ApiModelProperty("修改人ID")
    private Long modifierId;
} 